import random

from pydantic import BaseModel, Field
import time
from typing import Optional, List


class Parameter(BaseModel):
    eigenvalues: List[float]
    origin_values: List[float]


class Result(BaseModel):
    eigenvalues: List[float]
    new_values: List[float]


def random_num(num=200):
    return [random.random() for _ in range(num)]


def main(param: Parameter) -> Result:
    time.sleep(20)
    return Result(eigenvalues=param.eigenvalues, new_values=random_num(100))
